home *** CD-ROM | disk | FTP | other *** search
- /*
- File: SimpleFormat.h
-
- Copyright (c) 1994-6, Adobe Systems Incorporated.
- All rights reserved.
-
- Utilities for format module.
- */
-
- #ifndef __SimpleFormat_H__
- #define __SimpleFormat_H__
-
- #include "PITypes.h"
- #include "PIGeneral.h"
- #include "PIFormat.h"
- #include "PIUtilities.h"
- #include "PIActions.h"
-
- /*****************************************************************************/
- /* constants */
-
- #define keyFoo 'fooB'
- #define keyBar 'barF'
-
- /*****************************************************************************/
- /* scripting parameters */
-
- /*****************************************************************************/
-
- extern Handle hDllInstance;
-
- typedef struct GlobalData
- {
-
- FormatRecordPtr formatParamBlock;
- short result;
-
- BufferID pixelBuffer;
- Ptr pixelData;
-
- int32 rowBytes;
-
- } Globals, *GPtr, **GHdl;
-
- /*****************************************************************************/
-
- typedef struct FileHeader
- {
-
- char identifier [8];
-
- int16 mode;
- int16 depth;
- int16 rows;
- int16 cols;
- int16 planes;
-
- int32 resourceLength;
-
- } FileHeader;
-
- /*****************************************************************************/
-
- #define gStuff (globals->formatParamBlock)
- #define gResult (globals->result)
- #define gPixelBuffer (globals->pixelBuffer)
- #define gPixelData (globals->pixelData)
- #define gRowBytes (globals->rowBytes)
-
- /*****************************************************************************/
-
- void DoAbout (GPtr globals);
- Boolean ReadScriptParamsOnRead (GPtr globals);
- OSErr WriteScriptParamsOnRead (GPtr globals);
- Boolean ReadScriptParamsOnWrite (GPtr globals);
- OSErr WriteScriptParamsOnWrite (GPtr globals);
-
- /*****************************************************************************/
-
- #if MSWindows
- // prototypes of some Mac toolbox routines used in Export.c
- // Implemented in SimUiWin.c
- OSErr FSWrite(int32 refNum,long *count,void *buffPtr);
- OSErr FSRead(int32 refNum,long *count,void *buffPtr);
- OSErr SetFPos(int32 refNum, short posMode, long posOff);
- #define fsFromStart 0
- #endif /* MSWindows */
-
- /*****************************************************************************/
-
- #endif /* __SimpleFormat_H__ */